import React from "react";
import { connect } from "react-redux";
import { toggleSiderBar } from "@/store/actions";
import  * as Icon from '@ant-design/icons';
import "./index.less";
const Hamburger = (props) => {
  const { sidebarCollapsed, toggleSiderBar } = props;
  return (
    <>
    	{React.createElement(sidebarCollapsed ? Icon['MenuUnfoldOutlined'] : Icon['MenuFoldOutlined'], {
          	className: 'trigger',
          	onClick: toggleSiderBar,
        })}
    </>
  );
};

export default connect((state) => state.app, { toggleSiderBar })(Hamburger);
